<me:UIVAKDBEZ x:Class="WPFExcelReport.TVA31XJ"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"   
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN"  
                     xmlns:VA="clr-namespace:WPFExcelReport;assembly=TVAART"  
                    xmlns:GM="clr-namespace:WPFExcelReport;assembly=TGSMATK" 
                     xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    x:Name="TV"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <me:UIVAKDBEZ.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIVAKDBEZ.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Column="0">
            <WrapPanel>
                <Grid Margin="10,0,0,0" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="QueryXJCommand" Content="{Binding Source={Localization:Translate Word=查询}}" Height="20" Margin="5,0,0,0" Width="100" />
                    <TextBox Grid.Column="2"  Background="White" HorizontalAlignment="Right"
                             CharacterCasing="Upper"
                               Text="{Binding ART,ElementName=TV}" Width="100" />
                </Grid>
                <Grid Margin="10,0,0,0" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=包含已导入}}" Height="20" Margin="5,0,0,0" />
                    <TextBox Grid.Column="2"  Background="White" HorizontalAlignment="Right"
                             CharacterCasing="Upper"
                               Text="{Binding VAR,ElementName=TV}" Width="30" />
                </Grid>
              
                    <DR:TDRAUFTR  Grid.Column="0" Name="cDR" 
                                           VerticalAlignment="Top"
                                           DocType="YGRXJSH"   
                                           PrintType="OpenExcel" /> 
                    <Button Content="{Binding Source={Localization:Translate Word=导出}}" Margin="15,0,0,0" Click="ExcelCommand"/>
                <DR:TDRAUFTR  Grid.Column="0" Name="cDREXT" 
                                           VerticalAlignment="Top"
                                           DocType="LOADEXCEL"   
                                           PrintType="OpenExcel" />
                <Button Content="{Binding Source={Localization:Translate Word=导入}}" Margin="15,0,0,0" Click="LoadExtCommand"/>
                <TextBlock Text="{Binding Source={Localization:Translate Word=C:/IntexReport/Data/ITX/EXCEL/ITXEX-XXXX.xls}}"/>
                <Button Content="{Binding Source={Localization:Translate Word=自动导入}}" Click="Auto2ITXCommand"/>
             </WrapPanel>
            <WrapPanel>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <!--TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=客户:}}"></TextBlock-->
                    <KD:TSKD02  Grid.Column="1" 
                                Name="cKD02"
                                KEY="{Binding KUNDNR, ElementName=TV}"/>
                    <TextBlock Grid.Column="2"  Background="White" HorizontalAlignment="Right"
                               Text="{Binding KUNDNR,ElementName=TV}" Width="80" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=季节:}}"></TextBlock>
                    <TextBox Grid.Column="1"   Background="White" CharacterCasing="Upper"   Text="{Binding KOLL,ElementName=TV}" Width="40" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=客户色号:}}"></TextBlock>
                    <TextBox Grid.Column="1"   Background="White" CharacterCasing="Upper" 
                             Text="{Binding KDFARBNR,ElementName=TV, Converter={StaticResource ResourceKey=gb2312}}" Width="120" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=色号:}}"></TextBlock>
                    <TextBox Grid.Column="1"    Background="White" CharacterCasing="Upper" 
                             Text="{Binding FARBE,Converter={StaticResource ResourceKey=gb2312}}" Width="80" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=色名:}}"></TextBlock>
                    <TextBox Grid.Column="1" Background="White" CharacterCasing="Upper"
                             Text="{Binding DES,Converter={StaticResource ResourceKey=gb2312},UpdateSourceTrigger=PropertyChanged}" Width="200" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=成份个数:}}"></TextBlock>
                    <TextBox Grid.Column="1"    Background="White" CharacterCasing="Upper" 
                             Text="{Binding LFD,ElementName=TV}" Width="80" />
                </Grid>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1" 
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto" 
                   HeadersVisibility="Column"           
                   IsReadOnly="True"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ITXHAVE, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=标志}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAKBKUNDNR, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=客户编号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=KDKUNDNA,Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=客户}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAKBKOLL, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=季节}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAKBFARBE, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=色号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAFBEZ, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=色名}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAKBKDFARBNR, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=客户色号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAKBKDARTBEZ, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}" Visibility="Hidden" Header="{Binding Source={Localization:Translate Word=客户色名}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CR, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=R红}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CG, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=G绿}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CB, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=B兰}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CGRP, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=组}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGESANT1, Converter={StaticResource ResourceKey=d10}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=比例1}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGESBEZ1, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=成份1}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGESANT2, Converter={StaticResource ResourceKey=d10}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=比例2}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGESBEZ2, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=成份2}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGESANT3, Converter={StaticResource ResourceKey=d10}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=比例3}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGESBEZ3, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=成份3}}"  Width="Auto" /> 
            </DataGrid.Columns>
        </DataGrid  >
        <me:TXJVA30 Grid.Row="2" x:Name="cVA30"    
                    CGRP="{Binding CGRP,ElementName=TV}" 
                    VAFBEZ="{Binding VAFBEZ,ElementName=TV}" 
                      ORDERNUM="{Binding KEY,ElementName=TV}"
                  />
        <GM:TXJGS04  Grid.Row="3"  x:Name="cGS04" 
                    IsAuto="False"
                     dwVAK="{Binding dwVAK,ElementName=TV}" 
                     />
    </Grid>
</me:UIVAKDBEZ>
